<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
   
   <ui:composition template="/views/_template.xhtml">
    	<ui:define name="corpo">
            <h:form>
                <h:messages style="color: red"/>
                <p:outputLabel value="Incluir Banco" style="border-bottom: 3px solid #C22; text-align: left; font-size: 20px; width: 900px; "
                               rendered="#{empty bancoBean.banco.id}"/>
                <p:outputLabel value="Alterar Banco" style="border-bottom: 3px solid #C22; text-align: left; font-size: 20px; width: 900px; "
                               rendered="#{not empty bancoBean.banco.id}"/>
                
                <h:dataTable styleClass="dadosForm" style="border: 1px solid #E4E4E4" >
                    <h:column>
                        <f:facet name="header">
                           <h:outputLabel style="margin: 5px; text-align: left;" value="Número do Banco" /> 
                        </f:facet>
                        <f:facet name="footer">
                            <p:inputText id="nBanco" value="#{bancoBean.banco.numeroBanco}" />             
                        </f:facet> 
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputLabel style="margin: 5px; text-align: left;" value="Nome do banco"  /> 
                        </f:facet>
                        <f:facet name="footer">
                            <p:inputText value="#{bancoBean.banco.nomeBanco}" style="width: 300px;"/>
                        </f:facet>
                    </h:column>
                </h:dataTable><br />
                <h:commandButton value="Gravar" action="#{bancoBean.gravar}" />
                <h:commandButton value="Voltar" action="#{bancoBean.voltar}" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>
</html>

